package com.loong.ems.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 龙勇-229970722
 * @date 2025-01-03 10:03
 * @description: 打卡考勤表
 */

@Data
@NoArgsConstructor
@TableName(value = "emp_attendance_record")
public class EmpAttendanceRecord {

    @TableId(type = IdType.AUTO)
    private Long id; // 考勤记录Id

    @Schema(description = "打卡人Id")
    @TableField("user_id")
    private Long userId; // 打卡人Id

    @Schema(description = "考勤日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField("attendance_date")
    private Date attendanceDate; // 考勤日期

    @Schema(description = "签到时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("sign_in_time")
    private Date signInTime; // 签到时间

    @Schema(description = "签退时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField("check_out_time")
    private Date checkOutTime; // 签退时间
}